package com.ahau.springcloud.service;

import com.ahau.springcloud.entities.CommonResult;
import com.ahau.springcloud.entity.PayMent;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

/**
 * @Author xiao hu die
 * @Date 2021/12/18 18:15
 * @Version 1.0
 */
@Component
@FeignClient(value = "CLOUD-PAYMENT-SERVICE",fallback = PaymentHystrixService.class)
public interface PaymentFeignService {
    /**
     * 通过主键查询单条数据
     *
     * @param id 主键
     * @return 单条数据
     */
    @GetMapping("/payMent/selectOne/{id}")
    public CommonResult selectOne(@PathVariable("id") Long id) ;
    /**测试耗时的方法*/
    @GetMapping(value = "/payment/fegin/timeout")
    public String PaymentFeginTimeout();
}
